/*
 * @Author: your name
 * @Date: 2021-08-28 10:21:52
 * @LastEditTime: 2021-08-29 21:41:38
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \miniDataBase\src\part_1.c
 */
//
// Created by zhli on 2021/8/27.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "part_1.h"


void test_part_1()
{
    InputBuffer *input_buffer = new_input_buffer();
    while (true)
    {
        print_prompt();
        read_input(input_buffer);
        if (strcmp(input_buffer->buffer, ".exit") == 0)
        {
            close_input_buffer(input_buffer);
            exit(EXIT_SUCCESS);
        }
        else
        {
            printf("Unrecognized command '%s'.\n", input_buffer->buffer);
        }
    }
}
